var BoundaryManager = function(position, size) {
    this.position = position || new Point(0, 0);
    this.size = size || new Point(50, 50);
    
    this.checkBoundary = function(circle) {
        if (circle.position.x - circle.radius <= this.position.x
            || circle.position.x + circle.radius >= this.position.x + this.size.x
        ) {
            circle.velocity.x = -circle.velocity.x;
        }
        
        if (circle.position.y - circle.radius <= this.position.y
            || circle.position.y + circle.radius >= this.position.x + this.size.y
        ) {
            circle.velocity.y = -circle.velocity.y;
        }
    }
}